/**
 * 枚举
 */
// 通过枚举属性访问，和枚举的名字访问枚举类型
enum ResponseTo1 {
  no = 1,
  yes = 2
}

function respond (recipient:string, message:ResponseTo1):void{
  console.log(recipient);
  console.log(message);
  console.log(ResponseTo1[1]);
  let res:ResponseTo1 = 3
  console.log(res);
}
respond("Princess Caroline",ResponseTo1.yes)